/**
 * Domain class: Division
 * 
 * @author    Dmitry Ustimov
 * @date      March 2012
 * 
 */
package com.gr

class Division {

	String title
	String email
	Date startDate
	Company companyTo
	
	static hasMany = [ projects : Project ]
	
    static constraints = {
		title(size: 2..50, blank: false, unique: true)
		email(email: true, nullable: true)
		startDate(nullable: true)
		companyTo(blank: false)
	}
	
	String toString() {
		return "Division: ${title}"
	}
}
